package com.mcf.xiaolinju.controller;


import com.mcf.xiaolinju.service.impl.ReviewServiceImpl;
import com.mcf.xiaolinju.vo.ReviewVO;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author mcf
 * @since 2022-02-22
 */
@CrossOrigin
@RestController
@RequestMapping("/xiaolinju/review")
public class ReviewController {
@Resource
    ReviewServiceImpl reviewService;
//小程序查询评论
@RequestMapping("/getreviewmessage")
    public List<ReviewVO> getreviewmessage(int dynamicid){
    return reviewService.getreviewmessage(dynamicid);

}
//小程序添加评论
    @RequestMapping("insertReview")
    public String insertReview(int dynamicid,String reviewcontent,int reviewid){
    return  reviewService.insertReview(dynamicid,reviewcontent,reviewid);
    }

}
